package io.gitee.wolfmusic.jarlibrary.config;

import java.util.Objects;

/**
 * @author white
 * @version 1.0
 */
public class ArtifactConfig {

    private String groupId;
    private String artifactId;

    public String getGroupId() {
        return groupId.toLowerCase();
    }

    public String getArtifactId() {
        return artifactId.toLowerCase();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof ArtifactConfig)) return false;
        ArtifactConfig artifact = (ArtifactConfig) o;
        return Objects.equals(getGroupId(), artifact.getGroupId()) && Objects.equals(getArtifactId(), artifact.getArtifactId());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getGroupId(), getArtifactId());
    }

    @Override
    public String toString() {
        return "Artifact{" +
                "groupId='" + groupId + '\'' +
                ", artifactId='" + artifactId + '\'' +
                '}';
    }

}
